home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
-
- /*
- * skeeter.h
- * skeeter header file
- */
-
- int IsHit = 0;
- int IsHitX, IsHitY;
- int leftHit, rightHit;
-
- #define MAX_SHOTS 100
- int shotsFired = 0; /* number of shots fired; shotgun, 2 per pull */
-
- #define ZDEPTH 100.0
-
- /*
- * light properties
- */
- static float ambient[] = { 0.2, 0.2, 0.2, 1.0 };
- static float diffuse[] = { 0.4, 0.4, 0.4, 1.0 };
- static float specular[] = { 1.0, 1.0, 1.0, 1.0 };
- static float lpos[] = { 0, 0, 10, 0 };
-
- static float l2_ambient[] = { 0.3, 0.2, 0.2, 1.0 };
- static float l2_diffuse[] = { 0.6, 0.4, 0.4, 1.0 };
- static float l2_specular[] = { 1.0, 0.5, 0.5, 1.0 };
- static float l2_lpos[] = { -1, -3, 10, 0 };
- static float l2_direction[] = { 1, 1, 0, 0 };
-
- static float l3_ambient[] = { 0.0, 0.0, 0.3, 1.0 };
- static float l3_diffuse[] = { 0.0, 0.0, 0.6, 1.0 };
- static float l3_specular[] = { 0.0, 0.0, 1.0, 1.0 };
- static float l3_lpos[] = { -1, 3, 10, 0 };
- static float l3_direction[] = { -1, -1, 0, 0 };
-
- /*
- * light model ambient properties
- */
- float alm[] = { 0.1, 0.1, 0.1, 1};
-
- /*
- * material properties for left skeet
- */
- static float gambient[] = { 0.2, 0.3, 0.0, 1.0 };
- static float gdiffuse[] = { 0.22, 0.55, 0.0, 1.0 };
- static float gspecular[] = { 1.00, 1.00, 0.00, 1.0 };
- float shininess[] = { 8.0 };
-
- /*
- * material properties for left skeet
- */
- static float bambient[] = { 0.2, 0.0, 0.3, 1.0 };
- static float bdiffuse[] = { 0.22, 0.0, 0.55, 1.0 };
- static float bspecular[] = { 1.00, 1.00, 0.00, 1.0 };
-
-
-
- static float mambient[] = { 0.2, 0.2, 0.2, 1.0 };
- static float mdiffuse[] = { 0.4, 0.4, 0.4, 1.0 };
- static float mspecular[] = { 1.00, 1.00, 1.00, 1.0 };
-
- static float ma2[] = { 0.3, 0.3, 0.3, 0.1 };
- static float md2[] = { 0.6, 0.6, 0.6, 0.1 };
- static float ms2[] = { 1.00, 1.00, 1.00, 0.1 };
-
-
- /*
- * some common X pixel color values
- */
- int WHITE_PIXEL_NUM;
- int RED_PIXEL_NUM;
- int BLACK_PIXEL_NUM;
-
- /*
- * default window size
- */
- #define WINSIZE 600
-
-
- /*
- * overlay/underlay flags
- */
- int USE_OVERLAY = False;
- int USE_UNDERLAY = False;
-
- int xloc, yloc;
- /*
- * X stuff...
- */
- int xorigin, yorigin; /* window origin */
- unsigned int width, height; /* window width & height */
- Display *dpy; /* X Display */
- Window win; /* X Window Id */
- Window owin; /* X overlay window id */
- Window uwin; /* X underlay window id */
- GLXContext cx; /* Extesion to X server; GLX context
- Data structure for X to hold GL global
- data, so that we don't have to send them
- to X through protocal everytime to
- eliminate X traffic */
-
- Window winList[3]; /* list of X windows */
-
- GLXContext ocx; /* overlay window context */
- GLXContext ucx; /* underlay window context */
-
- /*
- * clay pidgeons
- */
- #define CD1_LIST 1 /* cd #1 display list id */
- #define SKEETER_LIST 2 /* skeeter bug display list */
- #define BACKGROUND_LIST 3 /* skeeter bug display list */
-
- /*
- * current trajectory info
- */
- float leftXInc, leftYInc, leftZInc;
- float leftX, leftY, leftZ;
- float rightXInc, rightYInc, rightZInc;
- float rightX, rightY, rightZ;
- float flyAngle;
-
- GLUquadricObj *cp1; /* clay pidgeon #1 quadric object */
- GLUquadricObj *cp2; /* clay pidgeon #2 quadric object */
-
- /*
- * struct for a falling cd
- */
- typedef struct cdi {
-
- int state; /* state, none, falling, breaking */
-
- float randx; /* random number generated x */
- float randy; /* random number generated y */
-
- float XInc; /* x position increment */
- float YInc; /* y position increment */
- float ZInc; /* z position increment */
-
- float posX; /* current X position */
- float posY; /* current Y position */
- float posZ; /* current Z position */
- } cd_i;
-
- #define MAX_LIGHTS 3
- #define MAX_DROPS 10
- #define NONE 0
- #define FALLING 1
-
-
- cd_i cd_info[MAX_DROPS];
-
- int num_cd = 3;
- int num_lights = 1;
-
- int DO_BACKGROUND = True;
-